<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'cms-form',
    'enableAjaxValidation' => false,
    'enableClientValidation' => true,
    'htmlOptions' => array(
        'class' => 'form-horizontal',
    ),
        ));
?>


<div class="row-fluid">
    <div class="span12">
        <!--PAGE CONTENT BEGINS-->
        <div class="control-group">
            <?php echo $form->labelEx($model, "page_type", array('class' => 'control-label')); ?>
            <div class="controls">
                <?php echo $form->dropdownlist($model, "page_type", MyFunctionCustom::getPagetype()); ?>
                <span class="help-inline"><?php echo $form->error($model, 'page_type'); ?></span>
            </div>
        </div>    
        <div class="control-group">
            <?php echo $form->labelEx($model, "name", array('class' => 'control-label')); ?>
            <div class="controls">
                <?php echo $form->textField($model, "name", array('class' => 'span6', 'size' => 60, 'maxlength' => 255)); ?>
                <span class="help-inline"><?php echo $form->error($model, 'name'); ?></span>
            </div>
        </div>

        <div class="control-group" >
            <?php echo $form->labelEx($model, 'description', array('class' => 'control-label')); ?>
            <div class="controls">
                <span class="help-inline"><?php echo $form->error($model, 'description'); ?></span>
            </div>
        </div>       
        <?php
        $this->widget('ext.editMe.ExtEditMe', array(
//                                                          'name' => 'Cms[description_'.$key .']',
            'height' => '250px',
            'width' => '100%',
            'model' => $model,
            'attribute' => "description",
            'toolbar' => Yii::app()->params['ckeditor'],
            'filebrowserBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html',
            'filebrowserImageBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html?type=Images',
            'filebrowserFlashBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html?type=Flash',
            'filebrowserUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
            'filebrowserImageUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
            'filebrowserFlashUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',
        ));
        ?>   
        <div class="clear"></div>


        <div class="form-actions">
            <button class="btn btn-info" type="submit">
                <i class="icon-ok bigger-110"></i>
                Submit
            </button>
        </div>
        <!--PAGE CONTENT ENDS-->
    </div><!--/.span-->
</div><!--/.row-fluid-->                      


<?php $this->endWidget(); ?>